import network from '../network'

export default {
    /**
     * 获取用户房间信息
     * @returns 
     */
	getUserBuildingInfo: () => {
		return network({
			url: `/wxMini/home/getUserBuilding`,
			method: 'get'
		})
	},
    /**
     * 绑定房号
     * @param {*} buildingId 
     * @returns 
     */
    bindBuildingForUser: (buildingId) => {
        return network({
            url: `/wxMini/home/bind/${buildingId}`,
            method: 'post'
        })
    },
    /**
     * 办理申请
     * @param {*} data 
     * @returns 
     */
    applyToInstall: (data) => {
        return network({
            url: `/wxMini/home/apply`,
            method: 'post',
            data
        })
    },
    /**
     * 申请报修
     * @param {*} data 
     * @returns 
     */
    applyToRepair: (data) => {
        return network({
            url: `/wxMini/home/repair`,
            method: 'post',
            data
        })
    },
}
